/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import eos.moe.dragoncore.api.model.AnimationEntityModel;
/*     */ import eos.moe.dragoncore.api.model.AnimationModel;
/*     */ import eos.moe.dragoncore.api.model.AnimationModelRenderer;
/*     */ import java.io.Serializable;
/*     */ import java.util.ArrayList;
/*     */ import java.util.Collections;
/*     */ import java.util.Comparator;
/*     */ import java.util.HashMap;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.function.Consumer;
/*     */ import java.util.stream.Collectors;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class zk
/*     */   extends bo
/*     */   implements Serializable
/*     */ {
/*     */   private static final long m = 3726656164116961212L;
/*     */   private boolean l;
/*     */   private final boolean t;
/*     */   private boolean d;
/*     */   private float z;
/*     */   private final String i;
/*     */   private final ResourceLocation w;
/*     */   private final int q;
/*     */   private final Map<String, vn> g;
/*     */   
/*     */   public zk(boolean bool1, boolean bool2, boolean bool3, float f, ResourceLocation resourceLocation, String str, int i, Map<String, vn> map) {
/*  42 */     this.l = bool1;
/*  43 */     this.d = bool3;
/*  44 */     this.z = f;
/*  45 */     this.i = str;
/*  46 */     this.w = resourceLocation;
/*  47 */     this.q = i;
/*  48 */     this.g = map;
/*  49 */     this.t = bool2;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(AnimationEntityModel animationEntityModel, w w1, int i) {
/*  54 */     AnimationModel animationModel = animationEntityModel.getBaseModel();
/*  55 */     if (this.g != null && 
/*  56 */       i <= this.q) {
/*  57 */       xea.l.v("query.anim_time", (i / 1000.0F));
/*     */ 
/*     */       
/*  60 */       if (z()) {
/*  61 */         animationModel.clear();
/*     */       }
/*     */       
/*  64 */       for (Map.Entry<String, vn> entry : this.g.entrySet()) {
/*  65 */         vn vn = (vn)entry.getValue();
/*  66 */         AnimationModelRenderer animationModelRenderer = animationModel.getPiece(vn.v());
/*  67 */         if (animationModelRenderer != null) {
/*  68 */           animationModelRenderer.setApplyAnimation(true);
/*  69 */           vn.v(this, w1, animationModelRenderer, i);
/*     */         } 
/*     */       } 
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public int v() {
/*  77 */     return this.q;
/*     */   }
/*     */   
/*     */   public String v() {
/*  81 */     return this.i;
/*     */   }
/*     */ 
/*     */   
/*     */   public ResourceLocation v() {
/*  86 */     return this.w;
/*     */   }
/*     */   
/*     */   public boolean h() {
/*  90 */     return this.l;
/*     */   }
/*     */   
/*     */   public void h() {
/*  94 */     this.l = true;
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean z() {
/*  99 */     return this.d;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v() {
/* 104 */     this.d = true;
/*     */   }
/*     */ 
/*     */   
/*     */   public float v() {
/* 109 */     return this.z;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(float f) {
/* 114 */     this.z = f;
/*     */   }
/*     */   
/*     */   public boolean v() {
/* 118 */     return this.t;
/*     */   }
/*     */   
/*     */   public Map<String, vn> v() {
/* 122 */     return this.g;
/*     */   }
/*     */ 
/*     */   
/*     */   public bo.eos/moe/dragoncore/bd v() {
/* 127 */     return new eos/moe/dragoncore/lk(this);
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(Consumer consumer) {
/* 132 */     if (v() != null) {
/* 133 */       v().forEach((str, vn1) -> a.accept(str));
/*     */     }
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public bo v() {
/*     */     Map<Object, Object> map;
/* 141 */     if (this.g == null) {
/* 142 */       map = null;
/*     */     } else {
/* 144 */       map = new HashMap<>();
/*     */       
/* 146 */       this.g.forEach((str, vn1) -> {
/*     */             List<fn> list1 = null;
/*     */             
/*     */             if (vn1.h() != null) {
/*     */               list1 = v(vn1.h());
/*     */             }
/*     */             
/*     */             List<fn> list2 = null;
/*     */             
/*     */             if (vn1.z() != null) {
/*     */               list2 = v(vn1.z());
/*     */             }
/*     */             
/*     */             List<fn> list3 = null;
/*     */             if (vn1.v() != null) {
/*     */               list3 = v(vn1.v());
/*     */             }
/*     */             map.put(vn1.v(), new vn(vn1.v(), list2, list1, list3));
/*     */           });
/*     */     } 
/* 166 */     return new zk(this.l, this.t, this.d, this.z, new ResourceLocation(this.w.func_110624_b(), this.w.func_110623_a() + "-reversed"), this.i + "-reversed", this.q, (Map)map);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public static class eos/moe/dragoncore/lk
/*     */     extends bo.eos/moe/dragoncore/bd
/*     */   {
/*     */     public eos/moe/dragoncore/lk(zk zk1) {
/* 178 */       super(zk1);
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*     */     public List<zm.eos/moe/dragoncore/lm> v(bo bo1, AnimationModel animationModel, int i, int j) {
/* 206 */       zk zk = v();
/* 207 */       if (zk.v() == null || zk.v().isEmpty()) {
/* 208 */         return null;
/*     */       }
/*     */       
/* 211 */       bo.eos/moe/dragoncore/bd eos/moe/dragoncore/bd1 = bo1.v();
/*     */       
/* 213 */       List<zm.eos/moe/dragoncore/lm> list = new ArrayList();
/* 214 */       zk.v().forEach((str, vn1) -> {
/*     */             AnimationModelRenderer animationModelRenderer = a.getPiece(str);
/*     */             
/*     */             if (animationModelRenderer != null) {
/*     */               fn fn1 = v(zk1, vn1.z(), new bax(0.0F, 0.0F, 0.0F), i);
/*     */               
/*     */               fn fn2 = eos/moe/dragoncore/bd1.v(animationModelRenderer, str, bo.eos/moe/dragoncore/zj.i, j);
/*     */               
/*     */               fj<fn, fn> fj1 = fj.v(fn1, fn2);
/*     */               
/*     */               fn1 = v(zk1, vn1.h(), animationModelRenderer.getOffsets(), i);
/*     */               
/*     */               fn2 = eos/moe/dragoncore/bd1.v(animationModelRenderer, str, bo.eos/moe/dragoncore/zj.w, j);
/*     */               
/*     */               fj<fn, fn> fj2 = fj.v(fn1, fn2);
/*     */               
/*     */               fn1 = v(zk1, vn1.v(), animationModelRenderer.getScaleFactor(), i);
/*     */               fn2 = eos/moe/dragoncore/bd1.v(animationModelRenderer, str, bo.eos/moe/dragoncore/zj.q, j);
/*     */               fj<fn, fn> fj3 = fj.v(fn1, fn2);
/*     */               list.add(new zm.eos/moe/dragoncore/lm(str, fj1, fj2, fj3));
/*     */             } 
/*     */           });
/* 236 */       return list;
/*     */     }
/*     */ 
/*     */     
/*     */     public fn v(AnimationModelRenderer animationModelRenderer, String str, bo.eos/moe/dragoncore/zj eos/moe/dragoncore/zj1, int i) {
/* 241 */       zk zk = v();
/* 242 */       boolean bool = (zk.v() != null && zk.v().containsKey(str));
/* 243 */       vn vn = bool ? zk.v().get(str) : null;
/*     */       
/* 245 */       if (eos/moe/dragoncore/zj1 == bo.eos/moe/dragoncore/zj.i) {
/* 246 */         if (vn != null) {
/* 247 */           return v(vn.z(), new bax(0.0F, 0.0F, 0.0F), i);
/*     */         }
/* 249 */         return fn.v(i, new bax(0.0F, 0.0F, 0.0F));
/*     */       } 
/* 251 */       if (eos/moe/dragoncore/zj1 == bo.eos/moe/dragoncore/zj.w) {
/* 252 */         if (vn != null) {
/* 253 */           return v(vn.h(), animationModelRenderer.getOffsets(), i);
/*     */         }
/* 255 */         return fn.v(i, animationModelRenderer.getOffsets());
/*     */       } 
/* 257 */       if (eos/moe/dragoncore/zj1 == bo.eos/moe/dragoncore/zj.q) {
/* 258 */         if (vn != null) {
/* 259 */           return v(vn.v(), animationModelRenderer.getScaleFactor(), i);
/*     */         }
/* 261 */         return fn.v(i, animationModelRenderer.getScaleFactor());
/*     */       } 
/*     */ 
/*     */       
/* 265 */       throw new UnsupportedOperationException("Can't handle " + eos/moe/dragoncore/zj1 + " option type");
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   public String toString() {
/* 271 */     return "BasicAnimation{name=" + this.i + ", id=" + this.w + ", looped=" + this.l + ", length=" + this.q + '}';
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\zk.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */